fix(macOS): emplace_back constructor fix; display_device interface factory#280
fix(macOS): emplace_back constructor fix; display_device interface factory#280martona wants to merge 3 commits into
Conversation
|
|
Just to clarify the issue:
I went with push_back and NOSONAR; the only way out of this would be to add a constructor to EnumeratedDevice so the first format works everywhere. But that'd make EnumeratedDevice no longer an aggregate, and cascade into a lot of code change just to keep Sonar happy. |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #280 +/- ##
==========================================
- Coverage 80.17% 80.15% -0.02%
==========================================
Files 59 63 +4
Lines 3370 3397 +27
Branches 1534 1545 +11
==========================================
+ Hits 2702 2723 +21
- Misses 326 355 +29
+ Partials 342 319 -23
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 2 files with indirect coverage changes Continue to review full report in Codecov by Harness.
|
ReenigneArcher
left a comment
There was a problem hiding this comment.
Probably worth adding a macos-14 matrix here just to make sure everything builds? https://github.com/LizardByte/libdisplaydevice/blob/master/.github/workflows/ci.yml
Would need an entry for build and coverage jobs.
|
|
||
| devices.emplace_back(device_id, display_name, friendly_name, edid, info); | ||
| // Keep braced aggregate construction; emplace_back(args...) relies on parenthesized aggregate init, which older libc++ rejects. | ||
| devices.push_back(EnumeratedDevice {device_id, display_name, friendly_name, edid, info}); // NOSONAR |
There was a problem hiding this comment.
Can you add the rule, like // NOSONAR(cpp:1234): and the reason here ?
I think you can search for // NONSONAR in the codebase if you need examples.



Description
The necessary changes for LizardByte/Sunshine#5338 to clear. Also includes the interface factory so display_device.cpp does not have to pull in platform-specific libdisplaydevice includes.
Screenshot
Issues Fixed or Closed
Roadmap Issues
Type of Change
Checklist
AI Usage